<div ng-include="'/modules/template/header.html'"></div>

<div class="weizhi">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 t_weizhi">
                当前位置->><a ui-sref="main">首页</a>->><a>个人中心</a>
            </div>
        </div>
    </div>
</div>

<div class="t_main tt_main">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="padding: 0;">
                <div ng-include="'/modules/template/member_center_menu.html'"></div>  
                <form name="myForm">
                <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 tt_form_box up_form_box">
                    <div class="ttbox">
                        <div class="ttb-top">
                            <div class="tt_title"><span>注册信息</span></div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                登录名
                      		</div>
                            <div class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.user_name}}
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                真实姓名
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.real_name}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.real_name" name="realName" maxlength="10" >
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                单位名称
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.company_name}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.company_name" name="companyName" maxlength="20" >
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                电子邮件
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.email}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.email" name="email" ng-pattern="/^[0-9a-z_]+@(([0-9a-z]+)[.]){1,2}[a-z]{2,3}$/" ng-required="true" maxlength="20" >
                                <div ng-show="myForm.email.$dirty && myForm.email.$error.pattern" style="display:inline-block;">
                                    <i class="glyphicon glyphicon-remove" style="color:red;margin-left: 20px;"></i>
                                    <span >请输入有效的邮箱地址</span>
                                </div>
                                <div ng-show="myForm.email.$dirty && myForm.email.$error.required" style="display:inline-block;">
                                    <i class="glyphicon glyphicon-remove" style="color:red;margin-left: 20px;"></i>
                                    <span >邮箱不能为空</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                省、城市
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.province | provinceFilter}} {{userInfo.city | provinceFilter}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <div data-toggle="distpicker" id="distpicker" style="display: inline;">
                                   <select name="province" style="width: 92px;" class="province" ng-model="province.id" ng-change="cBox.provinceChange(province.id);city.id='0';" ng-options="id as name for (id,name) in cBox.provinceArr"></select>
                                   <select name="city" style="width: 92px;" class="city" ng-model="city.id" ng-change="cBox.cityChange(city.id);" ng-options="id as name for (id,name) in cBox.getCityArr"></select>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                联系地址
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.connect_address}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.connect_address" name="connectAddress" maxlength="30" >
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                邮编
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.postcode}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.postcode" ng-pattern="/^1[0-9]{5}$/" name="postcode" maxlength="6" >
                                <div ng-show="myForm.postcode.$dirty && myForm.postcode.$error.pattern" style="display:inline-block;">
                                    <i class="glyphicon glyphicon-remove" style="color:red;margin-left: 20px;"></i>
                                    <span >邮编为1开头的6位数字，请输入有效的邮编</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                传真
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.fax}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.fax" ng-pattern="/^[0-9\-\s]*$/" name="fax" maxlength="15" >
                                <div ng-show="myForm.fax.$dirty && myForm.fax.$error.pattern" style="display:inline-block;">
                                    <i class="glyphicon glyphicon-remove" style="color:red;margin-left: 20px;"></i>
                                    <span>请输入有效的传真号码</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                手机
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.telephone}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.telephone" ng-pattern="/^1[34578]\d{9}$/" name="telephone" maxlength="11" >
                                 <div ng-show="myForm.telephone.$dirty && myForm.telephone.$error.pattern" style="display:inline-block;">
                                    <i class="glyphicon glyphicon-remove" style="color:red;margin-left: 20px;"></i>
                                    <span>请输入有效的移动电话号码</span>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                电话
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.phone_num}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.phone_num" ng-pattern="/^\d*$/" name="phone_num" maxlength="12" >
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                证件类型
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.id_type_v}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <select ng-model="userInfo.id_type_v" ng-options="idType.d_value as idType.d_value for idType in idTypeList">
                                    <option value="">选择证件类型</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                证件号码
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.id_num}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" ng-model="userInfo.id_num" name="id_num" maxlength="18" >
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                称谓
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.sex | sexFilter}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                               <input type="radio" style="width: 30px; margin-left: 20px;" ng-model="userInfo.sex" name="sex" ng-value="1">先生
                               <input type="radio" style="width: 30px; margin-left: 20px;" ng-model="userInfo.sex" name="sex" ng-value="0">女士
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                出生日期
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.birth_date}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <input type="text" class="time" readonly ng-model="userInfo.birth_date" name="birthDate">
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_list">
                            <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
                                教育程度
                            </div>
                            <div ng-show="!isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                {{userInfo.education_v}}
                            </div>
                            <div ng-show="isUpdate" class="col-lg-9 col-md-9 col-sm-9 col-xs-9">
                                <select ng-model="userInfo.education_v" ng-options="education.d_value as education.d_value for education in educationList">
                                    <option value="">选择教育程度</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 tt_button">
                            <div class="col-xs-4 tt_b1">
                                <button type="button" ng-disabled="myForm.$invalid" ng-click="isUpdate ? update() : isUpdate = true">
                                    <span ng-show="!isUpdate">修改资料</span>
                                    <span ng-show="isUpdate">保存</span>
                                </button>
                            </div>
                            <div class="col-xs-4 tt_b2">
                                <button type="button" ng-click="isUpdate ? reseatInfo() : goUpdatePassword()" >
                                    <span ng-show="!isUpdate">修改密码</span>
                                    <span ng-show="isUpdate">返回</span>
                                </button>
                            </div>
                            <div class="col-xs-4 tt_b3">
                                <button type="button" ng-click="exitUser()">退出登录</button>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                </form> 
            </div>
        </div>
    </div>
</div>